package com.woniu.controller;

import com.woniu.entity.Menu;
import com.woniu.service.MenuService;
import com.woniu.utils.ResData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author ：lisong
 * @date ：Created in 2024/1/23 2:21
 */
@RestController
public class MenuController {
    @Autowired
    MenuService menuService;

    @RequestMapping("/queryMenu")
    public ResData queryMenu() {
        List<Menu> menus = menuService.queryMenu();
        return ResData.success(menus);
    }
}
